<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>api_shim.core.net</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;api_shim ::
        <a href="api_shim.core-module.html">Package&nbsp;core</a> ::
        Module&nbsp;net
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="api_shim.core.net-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="api_shim.core.net-module.html">Module api_shim.core.net</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment"># Copyright 2011 the original author or authors.</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># you may not use this file except in compliance with the License.</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You may obtain a copy of the License at</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#      http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Unless required by applicable law or agreed to in writing, software</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># See the License for the specific language governing permissions and</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># limitations under the License.</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">""" </tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring">Net support to the python vert.x platform </tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">org</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Module api_shim.vertx=api_shim.vertx-module.html"><a title="api_shim.vertx" class="py-name" href="#" onclick="return doclink('link-0', 'vertx', 'link-0');">vertx</a></tt><tt class="py-op">.</tt><tt class="py-name">java</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Package api_shim.core=api_shim.core-module.html"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-1', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt class="py-name">Handler</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">org</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name"><a title="api_shim.vertx" class="py-name" href="#" onclick="return doclink('link-2', 'vertx', 'link-0');">vertx</a></tt><tt class="py-op">.</tt><tt class="py-name">java</tt><tt class="py-op">.</tt><tt class="py-name">platform</tt><tt class="py-op">.</tt><tt class="py-name">impl</tt><tt class="py-op">.</tt><tt class="py-name">JythonVerticleFactory</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-3', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module api_shim.core.tcp_support=api_shim.core.tcp_support-module.html"><a title="api_shim.core.tcp_support" class="py-name" href="#" onclick="return doclink('link-4', 'tcp_support', 'link-4');">tcp_support</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-5" class="py-name"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-5', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Module api_shim.core.ssl_support=api_shim.core.ssl_support-module.html"><a title="api_shim.core.ssl_support" class="py-name" href="#" onclick="return doclink('link-6', 'ssl_support', 'link-6');">ssl_support</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-7" class="py-name"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-7', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Module api_shim.core.buffer=api_shim.core.buffer-module.html"><a title="api_shim.core.buffer" class="py-name" href="#" onclick="return doclink('link-8', 'buffer', 'link-8');">buffer</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-9" class="py-name"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-9', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Module api_shim.core.streams=api_shim.core.streams-module.html"><a title="api_shim.core.streams" class="py-name" href="#" onclick="return doclink('link-10', 'streams', 'link-10');">streams</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-11" class="py-name"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-11', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Module api_shim.core.handlers=api_shim.core.handlers-module.html"><a title="api_shim.core.handlers" class="py-name" href="#" onclick="return doclink('link-12', 'handlers', 'link-12');">handlers</a></tt> <tt class="py-keyword">import</tt> <tt id="link-13" class="py-name" targets="Class api_shim.core.handlers.CloseHandler=api_shim.core.handlers.CloseHandler-class.html"><a title="api_shim.core.handlers.CloseHandler" class="py-name" href="#" onclick="return doclink('link-13', 'CloseHandler', 'link-13');">CloseHandler</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class api_shim.core.handlers.AsyncHandler=api_shim.core.handlers.AsyncHandler-class.html"><a title="api_shim.core.handlers.AsyncHandler" class="py-name" href="#" onclick="return doclink('link-14', 'AsyncHandler', 'link-14');">AsyncHandler</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name"><a title="api_shim.core" class="py-name" href="#" onclick="return doclink('link-15', 'core', 'link-1');">core</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Module api_shim.core.event_bus=api_shim.core.event_bus-module.html"><a title="api_shim.core.event_bus" class="py-name" href="#" onclick="return doclink('link-16', 'event_bus', 'link-16');">event_bus</a></tt> <tt class="py-keyword">import</tt> <tt id="link-17" class="py-name" targets="Class api_shim.core.event_bus.EventBus=api_shim.core.event_bus.EventBus-class.html"><a title="api_shim.core.event_bus.EventBus" class="py-name" href="#" onclick="return doclink('link-17', 'EventBus', 'link-17');">EventBus</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">"Scott Horn"</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt id="link-18" class="py-name" targets="Variable api_shim.core.buffer.__email__=api_shim.core.buffer-module.html#__email__,Variable api_shim.core.event_bus.__email__=api_shim.core.event_bus-module.html#__email__,Variable api_shim.core.file_system.__email__=api_shim.core.file_system-module.html#__email__,Variable api_shim.core.handlers.__email__=api_shim.core.handlers-module.html#__email__,Variable api_shim.core.http.__email__=api_shim.core.http-module.html#__email__,Variable api_shim.core.javautils.__email__=api_shim.core.javautils-module.html#__email__,Variable api_shim.core.net.__email__=api_shim.core.net-module.html#__email__,Variable api_shim.core.parsetools.__email__=api_shim.core.parsetools-module.html#__email__,Variable api_shim.core.shared_data.__email__=api_shim.core.shared_data-module.html#__email__,Variable api_shim.core.sock_js.__email__=api_shim.core.sock_js-module.html#__email__,Variable api_shim.core.ssl_support.__email__=api_shim.core.ssl_support-module.html#__email__,Variable api_shim.core.streams.__email__=api_shim.core.streams-module.html#__email__,Variable api_shim.core.tcp_support.__email__=api_shim.core.tcp_support-module.html#__email__,Variable api_shim.vertx.__email__=api_shim.vertx-module.html#__email__"><a title="api_shim.core.buffer.__email__
api_shim.core.event_bus.__email__
api_shim.core.file_system.__email__
api_shim.core.handlers.__email__
api_shim.core.http.__email__
api_shim.core.javautils.__email__
api_shim.core.net.__email__
api_shim.core.parsetools.__email__
api_shim.core.shared_data.__email__
api_shim.core.sock_js.__email__
api_shim.core.ssl_support.__email__
api_shim.core.streams.__email__
api_shim.core.tcp_support.__email__
api_shim.vertx.__email__" class="py-name" href="#" onclick="return doclink('link-18', '__email__', 'link-18');">__email__</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"scott@hornmicro.com"</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt id="link-19" class="py-name" targets="Variable api_shim.core.buffer.__credits__=api_shim.core.buffer-module.html#__credits__,Variable api_shim.core.event_bus.__credits__=api_shim.core.event_bus-module.html#__credits__,Variable api_shim.core.file_system.__credits__=api_shim.core.file_system-module.html#__credits__,Variable api_shim.core.handlers.__credits__=api_shim.core.handlers-module.html#__credits__,Variable api_shim.core.http.__credits__=api_shim.core.http-module.html#__credits__,Variable api_shim.core.javautils.__credits__=api_shim.core.javautils-module.html#__credits__,Variable api_shim.core.net.__credits__=api_shim.core.net-module.html#__credits__,Variable api_shim.core.parsetools.__credits__=api_shim.core.parsetools-module.html#__credits__,Variable api_shim.core.shared_data.__credits__=api_shim.core.shared_data-module.html#__credits__,Variable api_shim.core.sock_js.__credits__=api_shim.core.sock_js-module.html#__credits__,Variable api_shim.core.ssl_support.__credits__=api_shim.core.ssl_support-module.html#__credits__,Variable api_shim.core.streams.__credits__=api_shim.core.streams-module.html#__credits__,Variable api_shim.core.tcp_support.__credits__=api_shim.core.tcp_support-module.html#__credits__,Variable api_shim.vertx.__credits__=api_shim.vertx-module.html#__credits__"><a title="api_shim.core.buffer.__credits__
api_shim.core.event_bus.__credits__
api_shim.core.file_system.__credits__
api_shim.core.handlers.__credits__
api_shim.core.http.__credits__
api_shim.core.javautils.__credits__
api_shim.core.net.__credits__
api_shim.core.parsetools.__credits__
api_shim.core.shared_data.__credits__
api_shim.core.sock_js.__credits__
api_shim.core.ssl_support.__credits__
api_shim.core.streams.__credits__
api_shim.core.tcp_support.__credits__
api_shim.vertx.__credits__" class="py-name" href="#" onclick="return doclink('link-19', '__credits__', 'link-19');">__credits__</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Based entirely on work by Tim Fox http://tfox.org"</tt> </tt>
<a name="NetServer"></a><div id="NetServer-def"><a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="NetServer-toggle" onclick="return toggle('NetServer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html">NetServer</a><tt class="py-op">(</tt><tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">ssl_support</tt><tt class="py-op">.</tt><tt class="py-base-class">ServerSSLSupport</tt><tt class="py-op">,</tt> <tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">tcp_support</tt><tt class="py-op">.</tt><tt class="py-base-class">ServerTCPSupport</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="NetServer-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-docstring">"""Represents a TCP or SSL Server</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-docstring">    When connections are accepted by the server</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring">    they are supplied to the user in the form of a NetSocket instance that is passed via the handler</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring">    set using connect_handler.</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="NetServer.__init__"></a><div id="NetServer.__init__-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="NetServer.__init__-toggle" onclick="return toggle('NetServer.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">server</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetServer.__init__-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt> <tt class="py-op">=</tt> <tt class="py-name">server</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method api_shim.core.http.MultiMap.keys()=api_shim.core.http.MultiMap-class.html#keys,Method api_shim.core.shared_data.SharedHash.keys()=api_shim.core.shared_data.SharedHash-class.html#keys"><a title="api_shim.core.http.MultiMap.keys
api_shim.core.shared_data.SharedHash.keys" class="py-name" href="#" onclick="return doclink('link-20', 'keys', 'link-20');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">           <tt class="py-name">setattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"> </tt>
<a name="NetServer.connect_handler"></a><div id="NetServer.connect_handler-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="NetServer.connect_handler-toggle" onclick="return toggle('NetServer.connect_handler');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html#connect_handler">connect_handler</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer.connect_handler-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetServer.connect_handler-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-docstring">"""Supply a connect handler for this server. The server can only have at most one connect handler at any one time.</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">        As the server accepts TCP or SSL connections it creates an instance of NetSocket and passes it to the</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">        connect handler.</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword arguments:</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-docstring">        @param handler: connection handler</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a reference to self so invocations can be chained</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">connectHandler</tt><tt class="py-op">(</tt><tt id="link-21" class="py-name" targets="Class api_shim.core.net.ConnectHandler=api_shim.core.net.ConnectHandler-class.html"><a title="api_shim.core.net.ConnectHandler" class="py-name" href="#" onclick="return doclink('link-21', 'ConnectHandler', 'link-21');">ConnectHandler</a></tt><tt class="py-op">(</tt><tt class="py-name">handler</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<a name="NetServer.listen"></a><div id="NetServer.listen-def"><a name="L59"></a><tt class="py-lineno"> 59</tt> <a class="py-toggle" href="#" id="NetServer.listen-toggle" onclick="return toggle('NetServer.listen');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html#listen">listen</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">=</tt><tt class="py-string">"0.0.0.0"</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer.listen-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetServer.listen-expanded"><a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-docstring">"""Instruct the server to listen for incoming connections.</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword arguments:</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">        @param port:    The port to listen on.</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring">        @param host:    The host name or ip address to listen on.</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-docstring">        @param handler: The handler to notify once the listen operations completes (default None)</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a reference to self so invocations can be chained</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">handler</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method api_shim.core.http.HttpServer.listen()=api_shim.core.http.HttpServer-class.html#listen,Method api_shim.core.net.NetServer.listen()=api_shim.core.net.NetServer-class.html#listen"><a title="api_shim.core.http.HttpServer.listen
api_shim.core.net.NetServer.listen" class="py-name" href="#" onclick="return doclink('link-22', 'listen', 'link-22');">listen</a></tt><tt class="py-op">(</tt><tt id="link-23" class="py-name" targets="Variable api_shim.core.http.HttpClient.port=api_shim.core.http.HttpClient-class.html#port,Method api_shim.core.net.NetServer.port()=api_shim.core.net.NetServer-class.html#port"><a title="api_shim.core.http.HttpClient.port
api_shim.core.net.NetServer.port" class="py-name" href="#" onclick="return doclink('link-23', 'port', 'link-23');">port</a></tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name" targets="Variable api_shim.core.http.HttpClient.host=api_shim.core.http.HttpClient-class.html#host,Method api_shim.core.net.NetServer.host()=api_shim.core.net.NetServer-class.html#host"><a title="api_shim.core.http.HttpClient.host
api_shim.core.net.NetServer.host" class="py-name" href="#" onclick="return doclink('link-24', 'host', 'link-24');">host</a></tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">converter</tt><tt class="py-op">(</tt><tt class="py-param">server</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="api_shim.core.http.HttpServer.listen
api_shim.core.net.NetServer.listen" class="py-name" href="#" onclick="return doclink('link-25', 'listen', 'link-22');">listen</a></tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="api_shim.core.http.HttpClient.port
api_shim.core.net.NetServer.port" class="py-name" href="#" onclick="return doclink('link-26', 'port', 'link-23');">port</a></tt><tt class="py-op">,</tt> <tt id="link-27" class="py-name"><a title="api_shim.core.http.HttpClient.host
api_shim.core.net.NetServer.host" class="py-name" href="#" onclick="return doclink('link-27', 'host', 'link-24');">host</a></tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name"><a title="api_shim.core.handlers.AsyncHandler" class="py-name" href="#" onclick="return doclink('link-28', 'AsyncHandler', 'link-14');">AsyncHandler</a></tt><tt class="py-op">(</tt><tt class="py-name">handler</tt><tt class="py-op">,</tt> <tt class="py-name">converter</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"> </tt>
<a name="NetServer.close"></a><div id="NetServer.close-def"><a name="L78"></a><tt class="py-lineno"> 78</tt> <a class="py-toggle" href="#" id="NetServer.close-toggle" onclick="return toggle('NetServer.close');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer.close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetServer.close-expanded"><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-docstring">"""Close the server. The handler will be called when the close is complete."""</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">handler</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method api_shim.core.file_system.AsyncFile.close()=api_shim.core.file_system.AsyncFile-class.html#close,Method api_shim.core.http.HttpClient.close()=api_shim.core.http.HttpClient-class.html#close,Method api_shim.core.http.HttpServer.close()=api_shim.core.http.HttpServer-class.html#close,Method api_shim.core.http.HttpServerResponse.close()=api_shim.core.http.HttpServerResponse-class.html#close,Method api_shim.core.http.WebSocket.close()=api_shim.core.http.WebSocket-class.html#close,Method api_shim.core.net.NetClient.close()=api_shim.core.net.NetClient-class.html#close,Method api_shim.core.net.NetServer.close()=api_shim.core.net.NetServer-class.html#close,Method api_shim.core.net.NetSocket.close()=api_shim.core.net.NetSocket-class.html#close,Method api_shim.core.sock_js.SockJSSocket.close()=api_shim.core.sock_js.SockJSSocket-class.html#close"><a title="api_shim.core.file_system.AsyncFile.close
api_shim.core.http.HttpClient.close
api_shim.core.http.HttpServer.close
api_shim.core.http.HttpServerResponse.close
api_shim.core.http.WebSocket.close
api_shim.core.net.NetClient.close
api_shim.core.net.NetServer.close
api_shim.core.net.NetSocket.close
api_shim.core.sock_js.SockJSSocket.close" class="py-name" href="#" onclick="return doclink('link-29', 'close', 'link-29');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="api_shim.core.file_system.AsyncFile.close
api_shim.core.http.HttpClient.close
api_shim.core.http.HttpServer.close
api_shim.core.http.HttpServerResponse.close
api_shim.core.http.WebSocket.close
api_shim.core.net.NetClient.close
api_shim.core.net.NetServer.close
api_shim.core.net.NetSocket.close
api_shim.core.sock_js.SockJSSocket.close" class="py-name" href="#" onclick="return doclink('link-30', 'close', 'link-29');">close</a></tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="api_shim.core.handlers.AsyncHandler" class="py-name" href="#" onclick="return doclink('link-31', 'AsyncHandler', 'link-14');">AsyncHandler</a></tt><tt class="py-op">(</tt><tt class="py-name">handler</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="NetServer.port"></a><div id="NetServer.port-def"><a name="L86"></a><tt class="py-lineno"> 86</tt> <a class="py-toggle" href="#" id="NetServer.port-toggle" onclick="return toggle('NetServer.port');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html#port">port</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer.port-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetServer.port-expanded"><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">        The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">        signifying an ephemeral port</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="api_shim.core.http.HttpClient.port
api_shim.core.net.NetServer.port" class="py-name" href="#" onclick="return doclink('link-32', 'port', 'link-23');">port</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="NetServer.host"></a><div id="NetServer.host-def"><a name="L94"></a><tt class="py-lineno"> 94</tt> <a class="py-toggle" href="#" id="NetServer.host-toggle" onclick="return toggle('NetServer.host');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetServer-class.html#host">host</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetServer.host-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetServer.host-expanded"><a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-docstring">        The host to which the server is bound.</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="api_shim.core.http.HttpClient.host
api_shim.core.net.NetServer.host" class="py-name" href="#" onclick="return doclink('link-33', 'host', 'link-24');">host</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
<a name="NetClient"></a><div id="NetClient-def"><a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt> <a class="py-toggle" href="#" id="NetClient-toggle" onclick="return toggle('NetClient');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html">NetClient</a><tt class="py-op">(</tt><tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">ssl_support</tt><tt class="py-op">.</tt><tt class="py-base-class">ClientSSLSupport</tt><tt class="py-op">,</tt> <tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">tcp_support</tt><tt class="py-op">.</tt><tt class="py-base-class">TCPSupport</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="NetClient-expanded"><a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt class="py-docstring">"""NetClient is an asynchronous factory for TCP or SSL connections.</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring">    Multiple connections to different servers can be made using the same instance.</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="NetClient.__init__"></a><div id="NetClient.__init__-def"><a name="L106"></a><tt class="py-lineno">106</tt> <a class="py-toggle" href="#" id="NetClient.__init__-toggle" onclick="return toggle('NetClient.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.__init__-expanded"><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt> <tt class="py-op">=</tt> <tt class="py-name">org</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="api_shim.vertx" class="py-name" href="#" onclick="return doclink('link-34', 'vertx', 'link-0');">vertx</a></tt><tt class="py-op">.</tt><tt class="py-name">java</tt><tt class="py-op">.</tt><tt class="py-name">platform</tt><tt class="py-op">.</tt><tt class="py-name">impl</tt><tt class="py-op">.</tt><tt class="py-name">JythonVerticleFactory</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="api_shim.vertx" class="py-name" href="#" onclick="return doclink('link-35', 'vertx', 'link-0');">vertx</a></tt><tt class="py-op">.</tt><tt class="py-name">createNetClient</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="api_shim.core.http.MultiMap.keys
api_shim.core.shared_data.SharedHash.keys" class="py-name" href="#" onclick="return doclink('link-36', 'keys', 'link-20');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">           <tt class="py-name">setattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt>
<a name="NetClient.connect"></a><div id="NetClient.connect-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="NetClient.connect-toggle" onclick="return toggle('NetClient.connect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#connect">connect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.connect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.connect-expanded"><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-docstring">"""Attempt to open a connection to a server. The connection is opened asynchronously and the result returned in the</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-docstring">        handler.</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword arguments:</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"><tt class="py-docstring">        @param port: The port to connect to.</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-docstring">        @param host: The host or ip address to connect to.</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring">        @param handler: The connection handler</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a reference to self so invocations can be chained</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">converter</tt><tt class="py-op">(</tt><tt class="py-param">socket</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-37" class="py-name" targets="Class api_shim.core.net.NetSocket=api_shim.core.net.NetSocket-class.html"><a title="api_shim.core.net.NetSocket" class="py-name" href="#" onclick="return doclink('link-37', 'NetSocket', 'link-37');">NetSocket</a></tt><tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">)</tt> </tt>
</div><a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Method api_shim.core.http.HttpClient.connect()=api_shim.core.http.HttpClient-class.html#connect,Method api_shim.core.http.RouteMatcher.connect()=api_shim.core.http.RouteMatcher-class.html#connect,Method api_shim.core.net.NetClient.connect()=api_shim.core.net.NetClient-class.html#connect"><a title="api_shim.core.http.HttpClient.connect
api_shim.core.http.RouteMatcher.connect
api_shim.core.net.NetClient.connect" class="py-name" href="#" onclick="return doclink('link-38', 'connect', 'link-38');">connect</a></tt><tt class="py-op">(</tt><tt id="link-39" class="py-name"><a title="api_shim.core.http.HttpClient.port
api_shim.core.net.NetServer.port" class="py-name" href="#" onclick="return doclink('link-39', 'port', 'link-23');">port</a></tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name"><a title="api_shim.core.http.HttpClient.host
api_shim.core.net.NetServer.host" class="py-name" href="#" onclick="return doclink('link-40', 'host', 'link-24');">host</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name"><a title="api_shim.core.handlers.AsyncHandler" class="py-name" href="#" onclick="return doclink('link-41', 'AsyncHandler', 'link-14');">AsyncHandler</a></tt><tt class="py-op">(</tt><tt class="py-name">handler</tt><tt class="py-op">,</tt> <tt class="py-name">converter</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt>
<a name="NetClient.set_reconnect_attempts"></a><div id="NetClient.set_reconnect_attempts-def"><a name="L128"></a><tt class="py-lineno">128</tt> <a class="py-toggle" href="#" id="NetClient.set_reconnect_attempts-toggle" onclick="return toggle('NetClient.set_reconnect_attempts');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#set_reconnect_attempts">set_reconnect_attempts</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.set_reconnect_attempts-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.set_reconnect_attempts-expanded"><a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-docstring">        Set the number of reconnection attempts. In the event a connection attempt fails, the client will attempt</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-docstring">        to connect a further number of times, before it fails. Default value is zero.</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">setReconnectAttempts</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"> </tt>
<a name="NetClient.get_reconnect_attempts"></a><div id="NetClient.get_reconnect_attempts-def"><a name="L136"></a><tt class="py-lineno">136</tt> <a class="py-toggle" href="#" id="NetClient.get_reconnect_attempts-toggle" onclick="return toggle('NetClient.get_reconnect_attempts');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#get_reconnect_attempts">get_reconnect_attempts</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.get_reconnect_attempts-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.get_reconnect_attempts-expanded"><a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring">        Get the number of reconnect attempts</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">getReconnectAttempts</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">    <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-42" class="py-name" targets="Method api_shim.core.net.NetClient.get_reconnect_attempts()=api_shim.core.net.NetClient-class.html#get_reconnect_attempts"><a title="api_shim.core.net.NetClient.get_reconnect_attempts" class="py-name" href="#" onclick="return doclink('link-42', 'get_reconnect_attempts', 'link-42');">get_reconnect_attempts</a></tt><tt class="py-op">,</tt> <tt id="link-43" class="py-name" targets="Method api_shim.core.net.NetClient.set_reconnect_attempts()=api_shim.core.net.NetClient-class.html#set_reconnect_attempts"><a title="api_shim.core.net.NetClient.set_reconnect_attempts" class="py-name" href="#" onclick="return doclink('link-43', 'set_reconnect_attempts', 'link-43');">set_reconnect_attempts</a></tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"> </tt>
<a name="NetClient.set_reconnect_interval"></a><div id="NetClient.set_reconnect_interval-def"><a name="L144"></a><tt class="py-lineno">144</tt> <a class="py-toggle" href="#" id="NetClient.set_reconnect_interval-toggle" onclick="return toggle('NetClient.set_reconnect_interval');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#set_reconnect_interval">set_reconnect_interval</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.set_reconnect_interval-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.set_reconnect_interval-expanded"><a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"><tt class="py-docstring">        Set the reconnect interval, in milliseconds</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">setReconnectInterval</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"> </tt>
<a name="NetClient.get_reconnect_interval"></a><div id="NetClient.get_reconnect_interval-def"><a name="L151"></a><tt class="py-lineno">151</tt> <a class="py-toggle" href="#" id="NetClient.get_reconnect_interval-toggle" onclick="return toggle('NetClient.get_reconnect_interval');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#get_reconnect_interval">get_reconnect_interval</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.get_reconnect_interval-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.get_reconnect_interval-expanded"><a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"><tt class="py-docstring">        Get the reconnect interval, in milliseconds.</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">getReconnectInterval</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">    <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-44" class="py-name" targets="Method api_shim.core.net.NetClient.get_reconnect_interval()=api_shim.core.net.NetClient-class.html#get_reconnect_interval"><a title="api_shim.core.net.NetClient.get_reconnect_interval" class="py-name" href="#" onclick="return doclink('link-44', 'get_reconnect_interval', 'link-44');">get_reconnect_interval</a></tt><tt class="py-op">,</tt> <tt id="link-45" class="py-name" targets="Method api_shim.core.net.NetClient.set_reconnect_interval()=api_shim.core.net.NetClient-class.html#set_reconnect_interval"><a title="api_shim.core.net.NetClient.set_reconnect_interval" class="py-name" href="#" onclick="return doclink('link-45', 'set_reconnect_interval', 'link-45');">set_reconnect_interval</a></tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"> </tt>
<a name="NetClient.set_connect_timeout"></a><div id="NetClient.set_connect_timeout-def"><a name="L159"></a><tt class="py-lineno">159</tt> <a class="py-toggle" href="#" id="NetClient.set_connect_timeout-toggle" onclick="return toggle('NetClient.set_connect_timeout');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#set_connect_timeout">set_connect_timeout</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.set_connect_timeout-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.set_connect_timeout-expanded"><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-docstring">        Set the connect timeout in milliseconds.</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">setConnectTimeout</tt><tt class="py-op">(</tt><tt class="py-name">val</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"> </tt>
<a name="NetClient.get_connect_timeout"></a><div id="NetClient.get_connect_timeout-def"><a name="L166"></a><tt class="py-lineno">166</tt> <a class="py-toggle" href="#" id="NetClient.get_connect_timeout-toggle" onclick="return toggle('NetClient.get_connect_timeout');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#get_connect_timeout">get_connect_timeout</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.get_connect_timeout-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.get_connect_timeout-expanded"><a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"><tt class="py-docstring">        Returns the connect timeout in milliseconds</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">getConnectTimeout</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">    <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-46" class="py-name" targets="Method api_shim.core.net.NetClient.get_connect_timeout()=api_shim.core.net.NetClient-class.html#get_connect_timeout"><a title="api_shim.core.net.NetClient.get_connect_timeout" class="py-name" href="#" onclick="return doclink('link-46', 'get_connect_timeout', 'link-46');">get_connect_timeout</a></tt><tt class="py-op">,</tt> <tt id="link-47" class="py-name" targets="Method api_shim.core.net.NetClient.set_connect_timeout()=api_shim.core.net.NetClient-class.html#set_connect_timeout"><a title="api_shim.core.net.NetClient.set_connect_timeout" class="py-name" href="#" onclick="return doclink('link-47', 'set_connect_timeout', 'link-47');">set_connect_timeout</a></tt><tt class="py-op">)</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"> </tt>
<a name="NetClient.close"></a><div id="NetClient.close-def"><a name="L174"></a><tt class="py-lineno">174</tt> <a class="py-toggle" href="#" id="NetClient.close-toggle" onclick="return toggle('NetClient.close');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetClient-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetClient.close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetClient.close-expanded"><a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt class="py-docstring">"""Close the NetClient. Any open connections will be closed."""</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="api_shim.core.file_system.AsyncFile.close
api_shim.core.http.HttpClient.close
api_shim.core.http.HttpServer.close
api_shim.core.http.HttpServerResponse.close
api_shim.core.http.WebSocket.close
api_shim.core.net.NetClient.close
api_shim.core.net.NetServer.close
api_shim.core.net.NetSocket.close
api_shim.core.sock_js.SockJSSocket.close" class="py-name" href="#" onclick="return doclink('link-48', 'close', 'link-29');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line"> </tt>
<a name="NetSocket"></a><div id="NetSocket-def"><a name="L178"></a><tt class="py-lineno">178</tt> <a class="py-toggle" href="#" id="NetSocket-toggle" onclick="return toggle('NetSocket');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html">NetSocket</a><tt class="py-op">(</tt><tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">streams</tt><tt class="py-op">.</tt><tt class="py-base-class">ReadStream</tt><tt class="py-op">,</tt> <tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">streams</tt><tt class="py-op">.</tt><tt class="py-base-class">WriteStream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="NetSocket-expanded"><a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">    <tt class="py-docstring">"""NetSocket is a socket-like abstraction used for reading from or writing</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"><tt class="py-docstring">    to TCP connections.</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt>       </tt>
<a name="NetSocket.__init__"></a><div id="NetSocket.__init__-def"><a name="L182"></a><tt class="py-lineno">182</tt> <a class="py-toggle" href="#" id="NetSocket.__init__-toggle" onclick="return toggle('NetSocket.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">j_socket</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.__init__-expanded"><a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt> <tt class="py-op">=</tt> <tt class="py-name">j_socket</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">local_addr</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line"> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">simple_handler</tt><tt class="py-op">(</tt><tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name" targets="Method api_shim.core.streams.WriteStream.write()=api_shim.core.streams.WriteStream-class.html#write"><a title="api_shim.core.streams.WriteStream.write" class="py-name" href="#" onclick="return doclink('link-49', 'write', 'link-49');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">.</tt><tt class="py-name">body</tt><tt class="py-op">)</tt> </tt>
</div><a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">write_handler_id</tt> <tt class="py-op">=</tt> <tt id="link-50" class="py-name"><a title="api_shim.core.event_bus.EventBus" class="py-name" href="#" onclick="return doclink('link-50', 'EventBus', 'link-17');">EventBus</a></tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Static Method api_shim.core.event_bus.EventBus.register_simple_handler()=api_shim.core.event_bus.EventBus-class.html#register_simple_handler"><a title="api_shim.core.event_bus.EventBus.register_simple_handler" class="py-name" href="#" onclick="return doclink('link-51', 'register_simple_handler', 'link-51');">register_simple_handler</a></tt><tt class="py-op">(</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-name">simple_handler</tt><tt class="py-op">)</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">         </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">wrapped_close_handler</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">            <tt id="link-52" class="py-name"><a title="api_shim.core.event_bus.EventBus" class="py-name" href="#" onclick="return doclink('link-52', 'EventBus', 'link-17');">EventBus</a></tt><tt class="py-op">.</tt><tt id="link-53" class="py-name" targets="Static Method api_shim.core.event_bus.EventBus.unregister_handler()=api_shim.core.event_bus.EventBus-class.html#unregister_handler"><a title="api_shim.core.event_bus.EventBus.unregister_handler" class="py-name" href="#" onclick="return doclink('link-53', 'unregister_handler', 'link-53');">unregister_handler</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">write_handler_id</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">"_close_handler"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_close_handler</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">closeHandler</tt><tt class="py-op">(</tt><tt id="link-54" class="py-name"><a title="api_shim.core.handlers.CloseHandler" class="py-name" href="#" onclick="return doclink('link-54', 'CloseHandler', 'link-13');">CloseHandler</a></tt><tt class="py-op">(</tt><tt class="py-name">wrapped_close_handler</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"> </tt>
<a name="NetSocket.write_str"></a><div id="NetSocket.write_str-def"><a name="L198"></a><tt class="py-lineno">198</tt> <a class="py-toggle" href="#" id="NetSocket.write_str-toggle" onclick="return toggle('NetSocket.write_str');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#write_str">write_str</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">str</tt><tt class="py-op">,</tt> <tt class="py-param">enc</tt><tt class="py-op">=</tt><tt class="py-string">"UTF-8"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.write_str-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.write_str-expanded"><a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">        <tt class="py-docstring">"""Write a String to the socket. The handler will be called when the string has actually been written to the wire.</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword arguments:</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">        @param str: The string to write.</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">        @param enc: The encoding to use.</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="api_shim.core.streams.WriteStream.write" class="py-name" href="#" onclick="return doclink('link-55', 'write', 'link-49');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">,</tt> <tt class="py-name">enc</tt><tt class="py-op">)</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">       </tt>
<a name="NetSocket.close_handler"></a><div id="NetSocket.close_handler-def"><a name="L208"></a><tt class="py-lineno">208</tt> <a class="py-toggle" href="#" id="NetSocket.close_handler-toggle" onclick="return toggle('NetSocket.close_handler');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#close_handler">close_handler</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.close_handler-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.close_handler-expanded"><a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-docstring">"""Set a close handler on the socket.</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword arguments:</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line"><tt class="py-docstring">        @param handler: A block to be used as the handler</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_close_handler</tt> <tt class="py-op">=</tt> <tt class="py-name">handler</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"> </tt>
<a name="NetSocket.send_file"></a><div id="NetSocket.send_file-def"><a name="L217"></a><tt class="py-lineno">217</tt> <a class="py-toggle" href="#" id="NetSocket.send_file-toggle" onclick="return toggle('NetSocket.send_file');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#send_file">send_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">file_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.send_file-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.send_file-expanded"><a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">        <tt class="py-docstring">"""Tell the kernel to stream a file directly from disk to the outgoing connection, bypassing userspace altogether</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-docstring">        (where supported by the underlying operating system. This is a very efficient way to stream files.</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line"><tt class="py-docstring">        Keyword arguments:</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line"><tt class="py-docstring">        @param file_path: Path to file to send.</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">sendFile</tt><tt class="py-op">(</tt><tt class="py-name">file_path</tt><tt class="py-op">)</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line"> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="NetSocket.remote_address"></a><div id="NetSocket.remote_address-def"><a name="L228"></a><tt class="py-lineno">228</tt> <a class="py-toggle" href="#" id="NetSocket.remote_address-toggle" onclick="return toggle('NetSocket.remote_address');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#remote_address">remote_address</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.remote_address-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.remote_address-expanded"><a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"><tt class="py-docstring">        Returns the remote address as tuple in form of ('ipaddress', port)</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> <tt class="py-op">=</tt>  <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">remoteAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getHostAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">remoteAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getPort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">;</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">remote_addr</tt> </tt>
</div><a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="NetSocket.local_address"></a><div id="NetSocket.local_address-def"><a name="L237"></a><tt class="py-lineno">237</tt> <a class="py-toggle" href="#" id="NetSocket.local_address-toggle" onclick="return toggle('NetSocket.local_address');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#local_address">local_address</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.local_address-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.local_address-expanded"><a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"><tt class="py-docstring">        Returns the local address as tuple in form of ('ipaddress', port)</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">local_addr</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">local_addr</tt> <tt class="py-op">=</tt>  <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">localAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getHostAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt class="py-name">localAddress</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">getPort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">;</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">local_addr</tt> </tt>
</div><a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"> </tt>
<a name="NetSocket.close"></a><div id="NetSocket.close-def"><a name="L245"></a><tt class="py-lineno">245</tt> <a class="py-toggle" href="#" id="NetSocket.close-toggle" onclick="return toggle('NetSocket.close');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.NetSocket-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetSocket.close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetSocket.close-expanded"><a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-docstring">"""Close the socket"""</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">java_obj</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="api_shim.core.file_system.AsyncFile.close
api_shim.core.http.HttpClient.close
api_shim.core.http.HttpServer.close
api_shim.core.http.HttpServerResponse.close
api_shim.core.http.WebSocket.close
api_shim.core.net.NetClient.close
api_shim.core.net.NetServer.close
api_shim.core.net.NetSocket.close
api_shim.core.sock_js.SockJSSocket.close" class="py-name" href="#" onclick="return doclink('link-56', 'close', 'link-29');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line"> </tt>
<a name="ConnectHandler"></a><div id="ConnectHandler-def"><a name="L249"></a><tt class="py-lineno">249</tt> <a class="py-toggle" href="#" id="ConnectHandler-toggle" onclick="return toggle('ConnectHandler');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="api_shim.core.net.ConnectHandler-class.html">ConnectHandler</a><tt class="py-op">(</tt><tt class="py-base-class">org</tt><tt class="py-op">.</tt><tt class="py-base-class">vertx</tt><tt class="py-op">.</tt><tt class="py-base-class">java</tt><tt class="py-op">.</tt><tt class="py-base-class">core</tt><tt class="py-op">.</tt><tt class="py-base-class">Handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ConnectHandler-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ConnectHandler-expanded"><a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">    <tt class="py-docstring">""" Connection handler """</tt> </tt>
<a name="ConnectHandler.__init__"></a><div id="ConnectHandler.__init__-def"><a name="L251"></a><tt class="py-lineno">251</tt> <a class="py-toggle" href="#" id="ConnectHandler.__init__-toggle" onclick="return toggle('ConnectHandler.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.ConnectHandler-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ConnectHandler.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectHandler.__init__-expanded"><a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">handler</tt> <tt class="py-op">=</tt> <tt class="py-name">handler</tt> </tt>
</div><a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line"> </tt>
<a name="ConnectHandler.handle"></a><div id="ConnectHandler.handle-def"><a name="L254"></a><tt class="py-lineno">254</tt> <a class="py-toggle" href="#" id="ConnectHandler.handle-toggle" onclick="return toggle('ConnectHandler.handle');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="api_shim.core.net.ConnectHandler-class.html#handle">handle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">socket</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ConnectHandler.handle-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectHandler.handle-expanded"><a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">        <tt class="py-docstring">""" Call the handler after connection is established"""</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">handler</tt><tt class="py-op">(</tt><tt id="link-57" class="py-name"><a title="api_shim.core.net.NetSocket" class="py-name" href="#" onclick="return doclink('link-57', 'NetSocket', 'link-37');">NetSocket</a></tt><tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    on Wed Jul 17 20:25:01 2013
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>